Skip to content

Add test coverage for openDatabase#2042

Merged
elenatanasoiu merged 2 commits intomainfrom
elena/add-more-test-coverage
Feb 7, 2023
Merged

Add test coverage for openDatabase#2042
elenatanasoiu merged 2 commits intomainfrom
elena/add-more-test-coverage

Conversation

@elenatanasoiu
Copy link
Copy Markdown
Contributor

@elenatanasoiu elenatanasoiu commented Feb 6, 2023

We didn't have any.

This is a follow up to 6ad0104 to assure ourselves that we're not changing the default behaviour of openDatabase by adding a call to createSkeletonPacks.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@elenatanasoiu elenatanasoiu changed the title Elena/add more test coverage Add test coverage for openDatabase Feb 6, 2023
@elenatanasoiu elenatanasoiu changed the base branch from main to shati-elena/create-skeleton February 6, 2023 09:53
@elenatanasoiu elenatanasoiu force-pushed the shati-elena/create-skeleton branch from 967b63b to 7529fad Compare February 6, 2023 10:07
@elenatanasoiu elenatanasoiu force-pushed the elena/add-more-test-coverage branch from f451513 to deeb0fd Compare February 6, 2023 10:15
@elenatanasoiu elenatanasoiu force-pushed the shati-elena/create-skeleton branch from 48a5ed3 to d439215 Compare February 6, 2023 10:27
@elenatanasoiu elenatanasoiu force-pushed the elena/add-more-test-coverage branch from deeb0fd to 81b7482 Compare February 6, 2023 10:29
@elenatanasoiu elenatanasoiu force-pushed the shati-elena/create-skeleton branch from d439215 to e9bdd11 Compare February 6, 2023 10:30
@elenatanasoiu elenatanasoiu force-pushed the elena/add-more-test-coverage branch from 81b7482 to 0b61c1e Compare February 6, 2023 10:30
@elenatanasoiu elenatanasoiu force-pushed the shati-elena/create-skeleton branch from e9bdd11 to 6ad0104 Compare February 6, 2023 10:33
@elenatanasoiu elenatanasoiu force-pushed the elena/add-more-test-coverage branch 3 times, most recently from 78c8e81 to 11770b9 Compare February 6, 2023 11:09
@elenatanasoiu elenatanasoiu force-pushed the shati-elena/create-skeleton branch from 9092167 to f7e8a33 Compare February 6, 2023 17:34
@elenatanasoiu elenatanasoiu force-pushed the elena/add-more-test-coverage branch from 67a2710 to dede393 Compare February 6, 2023 17:35
@elenatanasoiu elenatanasoiu force-pushed the shati-elena/create-skeleton branch 2 times, most recently from b8e9938 to 0648b53 Compare February 7, 2023 10:56
@elenatanasoiu elenatanasoiu force-pushed the elena/add-more-test-coverage branch from dede393 to 17d2ff8 Compare February 7, 2023 11:00
@elenatanasoiu elenatanasoiu force-pushed the shati-elena/create-skeleton branch from 0648b53 to 235fb83 Compare February 7, 2023 11:26
We'd like to add test coverage for the openDatabase function (which is
public).

At the moment, this relies on `resolveDatabaseContents` which is just
a standalone function.

This means we're unable to mock it using Jest.

So let's move it into its own class.

This method in turn depends on a `resolveDatabase` function, which we've
also moved into the new class.

The only usages I could find for there functions were from within
the `databases.ts` file.
@elenatanasoiu elenatanasoiu force-pushed the elena/add-more-test-coverage branch 2 times, most recently from 371f6ec to b25d30b Compare February 7, 2023 11:42
@elenatanasoiu elenatanasoiu force-pushed the elena/add-more-test-coverage branch from b25d30b to 72f3847 Compare February 7, 2023 11:45
@elenatanasoiu elenatanasoiu marked this pull request as ready for review February 7, 2023 12:43
@elenatanasoiu elenatanasoiu requested a review from a team as a code owner February 7, 2023 12:43
Copy link
Copy Markdown
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🚢

Base automatically changed from shati-elena/create-skeleton to main February 7, 2023 12:49
@elenatanasoiu elenatanasoiu requested a review from a team February 7, 2023 12:49
@elenatanasoiu elenatanasoiu merged commit f7ab8b7 into main Feb 7, 2023
@elenatanasoiu elenatanasoiu deleted the elena/add-more-test-coverage branch February 7, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants